/**
 * Created by inZa on 1. 10. 2014.
 */
angular.module('aaser.controllers').controller('LoginController', ['$rootScope', '$scope', '$base64', 'Authentication','UserSession',
    function ($rootScope, $scope, $base64, Authentication,UserSession) {


    $scope.services = [{name:"DATABASE_1",source:"db1"},{name:"LDAP_1",source:"ldap1"}];

    $scope.login = function(){
        var credentials=$scope.name+":"+$scope.pass;
        Authentication.login($base64.encode(credentials), $scope.service);
    };
}]);